package nix.mall.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import nix.mall.common.pojo.NixMallResult;
import nix.mall.search.service.SearchItemService;

/**
 * 索引库维护Controller
 */
@Controller
public class SearchController {

	@Autowired
	private SearchItemService searchItemService;
	
	@RequestMapping("/search/import")
	@ResponseBody
	public NixMallResult importIndex() {
		NixMallResult result = searchItemService.importItemsToIndex();
		return result;
	}
}
